#ifndef Object_h
#define Object_h

#include "Ray.h"
#include "Color.h"
#include "Intersection.h"
#include <cmath>
#include "Texture.h"
#include "Matrix.h"

class Object
{
protected:

	Color color;
	Color specular;
	float diffusionCoefficient;
	float specularCoefficient;
	float rugositeCoefficient;
	float mirorReflexion;
	float bumpMapping;
	char * texture;
	Texture t;
	int id;

public:

	Object(){texture=NULL;}
	virtual bool intersection(Ray&, Intersection&) const = 0;
	virtual Vector getNormal (const Point&) const = 0;
	
	Color getColor() const {return color;}
	void setColor(const Color &c) {color=c;}

	Color getSpecular() const {return specular;}
	void setSpecular(const Color &c) {specular=c;}

	float getDiffusionCoefficient() const {return diffusionCoefficient;}
	void setDiffusionCoefficient(const float &a) {diffusionCoefficient=a;} 

	float getSpecularCoefficient() const {return specularCoefficient;}
	void setSpecularCoefficient(const float &a) {specularCoefficient=a;} 

	float getRugositeCoefficient() const {return rugositeCoefficient;}
	void setRugositeCoefficient(const float &a) {rugositeCoefficient=a;} 

	float getMirorReflexion() const {return mirorReflexion;}
	void setMirorReflexion(const float &a) {mirorReflexion=a;} 

	float getBumpMapping() const {return bumpMapping;}
	void setBumpMapping(const float &a) {bumpMapping=a;} 

	char* existTexture() const {return texture;}
	Texture getTexture() const{ return t;}
	void setTexture( char* a) 
	{
		texture=a;
		t.chargerFichier(texture);
	} 
	
	float getId() const {return id;}
	void setId(const int &a) {id=a;} 
};
#endif

